const Router = require('koa-router');
const { registerByPhone, registerByWeChat } = require('../controllers/userController');
const { loginByWeChat } = require('../controllers/userController');

const router = new Router({ prefix: '/api/user' });
router.post('/login/wechat', loginByWeChat);

router.post('/register/phone', registerByPhone);         // 手机号注册
router.post('/register/wechat', registerByWeChat);       // 微信一键注册

module.exports = router;
